<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserAppointmentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_appointment', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('自增id');

            $table->integer('user_id')->default(0)->comment('用户标识');
            $table->string('realname')->nullable()->default('')->comment('真实姓名');
            $table->string('phone')->nullable()->default('')->comment('联系电话');
            $table->timestamp('booking_time')->nullable()->comment('预约时间');
            $table ->integer('status')->default(0)->comment('预约状态,0预约中,1确认预约,2完成服务');
            $table->softDeletes();

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_appointment');
    }
}
